const dayjs = require('dayjs')
const utc = require('dayjs/plugin/utc')
dayjs.extend(utc)

const DEFAULT_FORMAT = 'YYYY-MM-DD HH:mm:ss'

export function formatUtcTime(utcString: string, format: string = DEFAULT_FORMAT) {
  return dayjs.utc(utcString).format(format)
}
